/**   
* @Title: SpiderSeed.java
* @Package me.crawler.entity
* @Description: TODO
* @author xaoyaoyao
* @date Jan 15, 2019 3:08:31 PM
* @version V1.0   
*/
package me.crawler.entity;

import java.io.Serializable;
import java.util.Map;

import com.alibaba.fastjson.JSON;

import lombok.Data;

/**
 * @ClassName: SpiderSeed
 * @Description: 种子，其模板信息
 * @author xaoyaoyao
 * @date Jan 15, 2019 3:08:31 PM
 * 
 */
@Data
public class SpiderSeed implements Serializable {

	private static final long serialVersionUID = 8195193028861342494L;
	
	private Long id;

	/** 名称 **/
	private String name;

	/** 域 **/
	private String domain;

	/** 模板 **/
	private String template;

	/** 其他属性信息 **/
	private Map<String, Object> attributes;

	@Override
	public String toString() {
		return JSON.toJSONString(this);
	}

	public static SpiderSeed parse(String json) {
		return JSON.parseObject(json, SpiderSeed.class);
	}
}
